<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="Cache-Control" content="no-siteapp" />
 <link href="assets/css/bootstrap.min.css" rel="stylesheet" />
        <link rel="stylesheet" href="css/style.css"/>       
        <link href="assets/css/codemirror.css" rel="stylesheet">
        <link rel="stylesheet" href="assets/css/ace.min.css" />
        <link rel="stylesheet" href="assets/css/font-awesome.min.css" />
        	<!--[if IE 7]>
		  <link rel="stylesheet" href="assets/css/font-awesome-ie7.min.css" />
		<![endif]-->
        <!--[if lte IE 8]>
		  <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
		<![endif]-->
		  
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=1.3"></script>
		<script src="js/jquery-1.9.1.min.js"></script>
        <script src="assets/js/bootstrap.min.js"></script>
		<script src="assets/js/typeahead-bs2.min.js"></script>           	
        <script src="assets/layer/layer.js" type="text/javascript" ></script>          
        <script src="assets/js/jquery-ui-1.10.3.custom.min.js"></script>
		<script src="assets/js/jquery.ui.touch-punch.min.js"></script>
        <script src="assets/js/ace-elements.min.js"></script>
		<script src="assets/js/ace.min.js"></script>
		<script src="assets/laydate/laydate.js" type="text/javascript"></script>
		<style type="text/css"> 
         #preview{width:100px;height:100px;border:1px solid #000;overflow:hidden;} 
         #imghead {filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image);} 
        </style> 
<title>手动客户添加</title>

</head>
<body>
<div class="margin clearfix">
 <div class="stystems_style">
  <div class="tabbable">
	<ul class="nav nav-tabs" id="myTab">
	  <li class="active">
		<a data-toggle="tab" href="#newdropdown"><i class="green fa fa-home bigger-110"></i>&nbsp;添加客户</a></li>	
	  <li class="">
		<a data-toggle="tab"  href="#homerr">&nbsp;地理位置</a>
      </li>
	</ul>

    <div class="tab-content">

<div id="newdropdown" class="tab-pane active">
                <ul class=" page-content">
       <div class="Operate_cont clearfix" style="margin-left:200px">
      <label class="form-label"><span class="c-red">*</span>客户名称：</label>
      <div class="formControls " style="width:280px;">
         <input type="text" class="input-text" value="" placeholder="" id="user-name" name="客户名称">
      </div>
    </div>
   
    <div class="Operate_cont clearfix" style="margin-left:200px">
      <label class="form-label"><span class="c-red">*</span>联系人：</label>
      <div class="formControls ">
        <input type="text" class="input-text" value="" placeholder="" id="user-name">
      </div>
    </div>
    <div class="Operate_cont clearfix" style="margin-left:200px">
      <label class="form-label"><span class="c-red">*</span>联系电话：</label>
      <div class="formControls ">
        <input type="text" class="input-text" value="" placeholder="" id="user-name">
      </div>
    </div>
    <div class="Operate_cont clearfix" style="margin-left:200px">
      <label class="form-label"><span class="c-red"></span>固定电话：</label>
      <div class="formControls ">
        <input type="text" class="input-text" value="" placeholder="" id="user-name" >
      </div>
    </div>
	<div class="Operate_cont clearfix" style="margin-left:200px">
      <label class="form-label"><span class="c-red"></span>邮箱：</label>
      <div class="formControls ">
        <input type="text" class="input-text" value="" placeholder="" id="user-name">
      </div>
    </div>
	<div class="Operate_cont clearfix" style="margin-left:200px">
      <label class="form-label"><span class="c-red"></span>客户地址：</label>
      <div class="formControls ">
        <input type="text" class="input-text" value="" placeholder="" id="user-name">
      </div>
    </div>
	<div class="Operate_cont clearfix" style="margin-left:200px">
      <label class="form-label"><span class="c-red"></span>经纬度：</label>
      <div class="formControls ">
        <input type="text" class="input-text" value="" placeholder="需地理位置确认" style="border:0px" id="value1">
      </div>
    </div>
	<div class="Operate_cont clearfix" id="test2" style="margin-left:200px" >
      <label class="form-label"><span class="c-red"></span>备注：</label>
      <div class="formControls "  style="width:300px">
        <input type="text" class="input-text" value="" placeholder="" id="user-name" >
      </div>
 </div>
    <div class="Operate_cont clearfix" style="margin-left:200px">
      <label class="form-label">客户简介：</label>
      <div class="formControls">
        <textarea name="" rows="" class="textarea"  placeholder="说点什么...最少输入10个字符" datatype="*10-100" dragonfly="true" nullmsg="备注不能为空！" onKeyUp="textarealength(this,100)"></textarea>
        <p class="textarea-numberbar"><em  class="textarea-length">0</em>/100</p>
      </div>
    </div>
  </ul>
  <div class="Button_operation"> 
		  
			<button onclick="tiaoz()" class="btn btn-primary " type="submit">&nbsp;&nbsp;保存&nbsp;&nbsp;</button>
				<button onclick="tiaozzz()" class="btn btn-default radius" type="button">&nbsp;&nbsp;返回&nbsp;&nbsp;</button>
		
			</div>
</div>


<div id="homerr" class="tab-pane">
    <div style="width:730px;margin:auto;">   
       <label style="width:260px"> 输入地址：<input id="text_" type="text" value="中国" /></label>
		<input type="button" value="查询"  class="btn btn-xs btn-info" onClick="searchByStationName();"/>
       <label  style="margin-left:50px;width:260px">经纬度：<input id="result_" type="text" /></label>
        <input type="button" value="确定使用" class="btn btn-xs btn-danger " onClick="setting();"/>
        <div id="container" 
            style="position: absolute;
                margin-top:30px; 
                width: 730px; 
                height: 590px; 
                top: 50; 
                border: 1px solid gray;
                overflow:hidden;">
        </div>
    </div>
</div>

 </div>
</div>
</div>
 </div>
</body>
<script type="text/javascript">

  function go(){location.href="my_clientele.html"; }
   function setting(){
	layer.confirm('确认要使用吗？',function(index){
		layer.msg('已使用!',{icon:1,time:1000});
	});
 		var valu = document.getElementById("result_").value;
          document.getElementById("value1").value = valu;
          document.getElementById("value2").value = valu;
		
}


    var map = new BMap.Map("container");
    map.centerAndZoom("宁波", 12);
    map.enableScrollWheelZoom();    //启用滚轮放大缩小，默认禁用
    map.enableContinuousZoom();    //启用地图惯性拖拽，默认禁用

    map.addControl(new BMap.NavigationControl());  //添加默认缩放平移控件
    map.addControl(new BMap.OverviewMapControl()); //添加默认缩略地图控件
    map.addControl(new BMap.OverviewMapControl({ isOpen: true, anchor: BMAP_ANCHOR_BOTTOM_RIGHT }));   //右下角，打开

map.addEventListener("click",function(e){   //单击地图，形成折线覆盖物
 
     document.getElementById("result_").value =e.point.lng + "," + e.point.lat;
       
});

    var localSearch = new BMap.LocalSearch(map);
    localSearch.enableAutoViewport(); //允许自动调节窗体大小
function searchByStationName() {
    map.clearOverlays();//清空原来的标注
    var keyword = document.getElementById("text_").value;
    localSearch.setSearchCompleteCallback(function (searchResult) {
        var poi = searchResult.getPoi(0);
        document.getElementById("result_").value = poi.point.lng + "," + poi.point.lat;
        map.centerAndZoom(poi.point, 13);
        var marker = new BMap.Marker(new BMap.Point(poi.point.lng, poi.point.lat));  // 创建标注，为要查询的地方对应的经纬度
        map.addOverlay(marker);
        var content = document.getElementById("text_").value + "<br/><br/>经度：" + poi.point.lng + "<br/>纬度：" + poi.point.lat;
        var infoWindow = new BMap.InfoWindow("<p style='font-size:14px;'>" + content + "</p>");
        marker.addEventListener("click", function () { this.openInfoWindow(infoWindow); });
        // marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画
    });
    localSearch.search(keyword);
} 

</script>
</html>
<script type="text/javascript">
// $(".widget-box").height($(window).height()-215); 
//$(".table_menu_list").width($(window).width()-260);
// $(".table_menu_list").height($(window).height()-215);
//  //当文档窗口发生改变时 触发  
//    $(window).resize(function(){
//	$(".widget-box").height($(window).height()-215);
//	 $(".table_menu_list").width($(window).width()-260);
//	  $(".table_menu_list").height($(window).height()-215);
//	})

function tiaozzz(){

		 window.location.href='my_clientele.html';
	
}
function tiaoz(){

	layer.confirm('确认要保存吗？',function(index){
		layer.msg('已保存!',{icon:1,time:1000});
		 window.location.href='my_clientele.html';
	});
}
</script>